﻿// --------------------------------------------------------------------------------------------------------------------
// <copyright file="CacheNull.cs" company="Rolosoft Ltd">
//   © Rolosoft Ltd
// </copyright>
// --------------------------------------------------------------------------------------------------------------------

#region License

// Copyright 2013 Rolosoft Ltd
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
#endregion

namespace Rsft.Net.Dns
{
    #region Usings

    using System;

    using Rsft.Net.Dns.Interfaces;

    #endregion

    /// <summary>
    ///     The cache null.
    /// </summary>
    internal sealed class CacheNull : ICache
    {
        #region Public Methods and Operators

        /// <summary>
        /// Adds an object to the cache.
        /// </summary>
        /// <param name="key">
        /// The key.
        /// </param>
        /// <param name="value">
        /// The value.
        /// </param>
        public void Add(string key, object value)
        {
        }

        /// <summary>
        /// Adds an object to the cache. This method provides the ability to specify when the object should be expired.
        /// </summary>
        /// <param name="key">
        /// The key.
        /// </param>
        /// <param name="value">
        /// The value.
        /// </param>
        /// <param name="timeSpan">
        /// The time span.
        /// </param>
        public void Add(string key, object value, TimeSpan timeSpan)
        {
        }

        /// <summary>
        /// Adds an object to a region in the cache.
        /// </summary>
        /// <param name="key">
        /// The key.
        /// </param>
        /// <param name="value">
        /// The value.
        /// </param>
        /// <param name="regionName">
        /// The region name.
        /// </param>
        public void Add(string key, object value, string regionName)
        {
        }

        /// <summary>
        /// Adds an object to the cache by region name. This method provides the ability to specify when the object should be expired.
        /// </summary>
        /// <param name="key">
        /// The key.
        /// </param>
        /// <param name="value">
        /// The value.
        /// </param>
        /// <param name="regionName">
        /// The region name.
        /// </param>
        /// <param name="timeSpan">
        /// The time span.
        /// </param>
        public void Add(string key, object value, string regionName, TimeSpan timeSpan)
        {
        }

        /// <summary>
        ///     Deletes all objects from cache.
        /// </summary>
        public void ClearAll()
        {
        }

        /// <summary>
        /// Gets an object from the cache using the specified key.
        /// </summary>
        /// <param name="key">
        /// The key.
        /// </param>
        /// <returns>
        /// The <see cref="object"/>.
        /// </returns>
        public object Get(string key)
        {
            return default(object);
        }

        /// <summary>
        /// Gets an object from the specified region by using the specified key.
        /// </summary>
        /// <param name="key">
        /// The key.
        /// </param>
        /// <param name="regionName">
        /// The region name.
        /// </param>
        /// <returns>
        /// The <see cref="object"/>.
        /// </returns>
        public object Get(string key, string regionName)
        {
            return default(object);
        }

        /// <summary>
        /// Adds or replaces an object in the cache.
        /// </summary>
        /// <param name="key">
        /// The key.
        /// </param>
        /// <param name="value">
        /// The value.
        /// </param>
        public void Put(string key, object value)
        {
        }

        /// <summary>
        /// Adds or replaces an object in the specified region.
        /// </summary>
        /// <param name="key">
        /// The key.
        /// </param>
        /// <param name="value">
        /// The value.
        /// </param>
        /// <param name="regionName">
        /// The region name.
        /// </param>
        public void Put(string key, object value, string regionName)
        {
        }

        /// <summary>
        /// Adds or replaces an object in the cache. Specifies the timeout value of the cached object.
        /// </summary>
        /// <param name="key">
        /// The key.
        /// </param>
        /// <param name="value">
        /// The value.
        /// </param>
        /// <param name="timeSpan">
        /// The time span.
        /// </param>
        public void Put(string key, object value, TimeSpan timeSpan)
        {
        }

        /// <summary>
        /// Adds or replaces an object in the cache by region. Specifies the timeout value of the cached object.
        /// </summary>
        /// <param name="key">
        /// The key.
        /// </param>
        /// <param name="value">
        /// The value.
        /// </param>
        /// <param name="regionName">
        /// The region name.
        /// </param>
        /// <param name="timeSpan">
        /// The time span.
        /// </param>
        public void Put(string key, object value, string regionName, TimeSpan timeSpan)
        {
        }

        /// <summary>
        /// Removes an object from the cache.
        /// </summary>
        /// <param name="key">
        /// The key.
        /// </param>
        public void Remove(string key)
        {
        }

        #endregion
    }
}